#pragma once

#include <QWidget>
#include "ui_EditTestCaseMain.h"
#include<QDateTime>
#include <Common/commondef.h>
class EditProcedure;
class projectInfo;
class EditTestCase : public QWidget
{
	Q_OBJECT

public:
	EditTestCase(QWidget *parent = Q_NULLPTR);
	~EditTestCase();

private slots:
    void on_pushButton_saveAsXml_clicked();

    void on_pushButton_savePro_clicked();

private:
	void ConnectAllSlots();
	void InitUI();

	void AddTreeWidgetData();
	void CreateTreeWidgetMenu();

	void createTestCase();
	void delTestCase();
	void slots_showrightMenu(QPoint point);
	void OnTreeWidgetClicked();

	void SaveTestCase();


	void OnPushbutton_CreateProClicked();
	void OnPushbutton_OpenPro_Clicked();
	void OnPushbutton_DeletePro_Clicked();

	void OnSinalCreate();

private:
	Ui::EditTestCase ui;
	QMenu* popMenu;
	QAction* deleteNode;
	QAction* addNode;
	QTreeWidgetItem* selectItem;

	EditProcedure* procedureEdit = nullptr;
	projectInfo* projectInfoEdit = nullptr;

	//内容
	//Treewidget 内容存储 记录树关系，以及项目配置文件Excel信息
    QMap<QString, TCMSEditInfo> _tcmsEditInfos;
	
	//实际测试用例内容存储EXcel读写
};
